import axios from '@/utils/request'
import type { LoginForm, RegisterForm } from '@/types/login'
import type { baseResponse } from '@/types/public'

// 用户登录接口
export const loginAPI = async (data: LoginForm) => {
  return (await axios.post<baseResponse<string>>('User/login', data)).data
}

// 用户注册接口
export const registerAPI =  async (data: RegisterForm) => {
  return (await axios.post<baseResponse<string>>('User/register', data)).data
}
